import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    islogin:false,
    breadItem:'',
    dataList:[],
    dataTotal:0,
    currentPage:1
  },
  mutations: {
    login(state,value){
      state.islogin=value
    },
    toBread(state,value){
      state.breadItem=value
    },
    saveData(state,value){
      const {data,total,currentPage}=value;
      state.dataList=data;
      state.dataTotal=total;
      state.currentPage=currentPage;
    }
  },
  actions: {
  },
  modules: {
  }
})
